package com.zr.Paydivide.controller;

import com.zr.Paydivide.service.PaydivideService;
import com.zr.util.LoginSession;
import com.zr.util.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by star on 2019/7/4.
 */
@RestController
public class PaydivideController {

    @Autowired
    private PaydivideService paydivideService;

    @GetMapping("payDivide/findByLoginId")
    public ResultVo findByLoginId(HttpServletRequest request){
        Integer loginId= LoginSession.getLoginId(request.getSession());
        return  paydivideService.findByLoginId(loginId);
    }
    @GetMapping("payDivide/add")
    public ResultVo payDivideAdd(HttpServletRequest request){
        Integer loginId= LoginSession.getLoginId(request.getSession());
        return  paydivideService.payDivideAdd(loginId);
    }



}
